﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShiQuan.IotDevice.Entity
{
    /// <summary>
    /// 设备数据
    /// </summary>
    public class IotDeviceDataEntity
    {
        /// <summary>
        /// 数据唯一标识
        /// </summary>
        [Key]
        [Display(Name = "数据唯一标识"), MaxLength(50)]
        public string Id { get; set; }
        /// <summary>
        /// 客户标识
        /// </summary>
        [Display(Name = "客户标识"), MaxLength(50)]
        public string RefCorpId { get; set; }
        /// <summary>
        /// 设备信息标识
        /// </summary>
        [Display(Name = "设备信息标识"), MaxLength(50)]
        public string RefDeviceId { get; set; }
        /// <summary>
        /// 设备名称
        /// </summary>
        [Display(Name = "名称"), MaxLength(50)]
        public string DeviceName { get; set; }
        /// <summary>
        /// 安装标识
        /// </summary>
        [Display(Name = "安装标识"), MaxLength(50)]
        public string RefInstallId { get; set; }
        /// <summary>
        /// 设备唯一标识
        /// </summary>
        [Display(Name = "设备唯一标识"), MaxLength(50)]
        public string SerialNumber { get; set; }
        /// <summary>
        /// 传感器
        /// </summary>
        [Display(Name = "传感器"), MaxLength(50)]
        public string RefSersorId { get; set; }
        /// <summary>
        /// 传感器名称-温度、湿度
        /// </summary>
        [Display(Name = "传感器名称"), MaxLength(50)]
        public string SersorName { get; set; }
        /// <summary>
        /// 序号
        /// </summary>
        [Display(Name = "序号")]
        public int Index { get; set; }
        /// <summary>
        /// 时间
        /// </summary>
        [Display(Name = "时间")]
        public DateTime? Time { get; set; }
        
        /// <summary>
        /// 日期
        /// </summary>
        [Display(Name = "日期")]
        public DateTime? Date { get; set; }
        /// <summary>
        /// 年
        /// </summary>
        [Display(Name = "年")]
        public int? Year { get; set; }
        /// <summary>
        /// 月
        /// </summary>
        [Display(Name = "月")]
        public int? Month { get; set; }
        /// <summary>
        /// 周
        /// </summary>
        [Display(Name = "周")]
        public int? Week { get; set; }
        /// <summary>
        /// 日
        /// </summary>
        [Display(Name = "日")]
        public int? Day { get; set; }
        /// <summary>
        /// 时
        /// </summary>
        [Display(Name = "时")]
        public int? Hour { get; set; }
        /// <summary>
        /// 单位：%RH
        /// </summary>
        [Display(Name = "单位"), MaxLength(50)]
        public string Unit { get; set; }
        /// <summary>
        /// 数值
        /// </summary>
        [Display(Name = "数值")]
        public decimal? Value { get; set; }
        /// <summary>
        /// 数值
        /// </summary>
        [Display(Name = "数值"), MaxLength(50)]
        public string Text { get; set; }
    }
}
